package com.web.exiaodao.business.entity;

import com.web.webstart.base.entity.BaseEntity;
import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 *
 * @ClassName: serviceCommon
 * @Description: 服务-公用表(1:金融保险 2：智慧传承 3：生前契约)定义表
 * @author eason
 * @date 2016-11-28 18:16:50
 *
 */
@Entity
@Table(name = "tb_xa_serviceCommon")
@ApiModel(value="服务-公用表(1:金融保险 2：智慧传承 3：生前契约 4:医疗服务（医疗康复）)定义表")
public class ServiceCommon extends BaseEntity{

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value="标题,标题")
    private String title;
    @ApiModelProperty(value="简介,简介")
    private String briefInfo;

    /**
     * 新添加的两个属性
     */
    @ApiModelProperty(value="注意事项(50),注意事项")
    private String attention;
    @ApiModelProperty(value="服务价格,服务价格")
    private Double price;

    @ApiModelProperty(value="图片,图片")
    private String img;
    @ApiModelProperty(value="服务电话,tel")
    private String tel;
    @ApiModelProperty(value="详细介绍（富文本）,详细介绍")
    private String content;
    @ApiModelProperty(value="服务类型1:金融保险 2：智慧传承 3：生前契约 4:医疗服务（医疗康复）,serviceType")
    private String serviceType;

    @ApiModelProperty(value = "点击量,点击量")
    private Long clickCont;
    @ApiModelProperty(value="排序值,排序值")
    private Long sort;

    public static final long SORT_DEFAULT = 9999999L;

    public ServiceCommon() {
		// TODO Auto-generated constructor stub
	}

    public void setTitle(String title){
        this.title=title;
    }

    @Column(nullable=true,length=50)
    public String getTitle(){
        return title;
    }
    public void setBriefInfo(String briefInfo){
        this.briefInfo=briefInfo;
    }

    @Column(nullable=true,length=100)
    public String getBriefInfo(){
        return briefInfo;
    }
    public void setImg(String img){
        this.img=img;
    }

    @Column(nullable=true,length=255)
    public String getImg(){
        return img;
    }
    public void setTel(String tel){
        this.tel=tel;
    }

    @Column(nullable=true,length=50)
    public String getTel(){
        return tel;
    }
    public void setContent(String content){
        this.content=content;
    }

    @Column(nullable=true,length=5000,columnDefinition="MEDIUMTEXT")
    public String getContent(){
        return content;
    }
    public void setServiceType(String serviceType){
        this.serviceType=serviceType;
    }

    @Column(nullable=true,length=50)
    public String getServiceType(){
        return serviceType;
    }

    @Column(nullable=true,length=50)
    public String getAttention() {
        return attention;
    }

    public void setAttention(String attention) {
        this.attention = attention;
    }

    @Column(nullable=true,length=50)
    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    @Column(nullable = true, length = 50)
    public Long getClickCont() {
        return clickCont;
    }

    public void setClickCont(Long clickCont) {
        this.clickCont = clickCont;
    }

    @Column(nullable = true, length = 50)
    public Long getSort() {
        return sort;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    @Override
    public void setInsertBefore() {
        super.setInsertBefore();
        if (sort == null) {
            sort = SORT_DEFAULT;//排序默认值
        }
    }
}
